// Formal Verification Project
// Non-pipelined AES Unit

// Roundkey Selector
// 11/20/2011


module keyselector (roundkey_0, // input from key_expansion
					roundkey_1,
					roundkey_2,
					roundkey_3,
					roundkey_4,
					roundkey_5,
					roundkey_6,
					roundkey_7,
					roundkey_8,
					roundkey_9,
					roundkey_10,
					current_key,
					key_sel);// output to add_roundkey containing the current round's key)
					

input [0:127] roundkey_0, roundkey_1, roundkey_2, roundkey_3, roundkey_4, roundkey_5, roundkey_6, roundkey_7, roundkey_8, roundkey_9, roundkey_10;
input [3:0] key_sel;

output [0:127] current_key;

reg [0:127] temp_key;

always @* 
	begin
 		case(key_sel)
			4'b0000: temp_key = roundkey_0;
			4'b0001: temp_key = roundkey_1;
			4'b0010: temp_key = roundkey_2;		
			4'b0011: temp_key = roundkey_3;
			4'b0100: temp_key = roundkey_4;
			4'b0101: temp_key = roundkey_5;
			4'b0110: temp_key = roundkey_6;
			4'b0111: temp_key = roundkey_7;
			4'b1000: temp_key = roundkey_8;
			4'b1001: temp_key = roundkey_9;
			4'b1010: temp_key = roundkey_10;
			default: temp_key = 128'd0;
		endcase
	end // end always block
assign current_key = temp_key;

endmodule
		